package sysu.el.graph.tree;

import java.util.Arrays;

import sysu.el.graph.GraphConstants;

public class FatherTreeTopo {
	
	public int root;
	
	public int fa[];
	public int getNodeNum(){
		return fa.length;
	}
	
	public FatherTreeTopo(int n){
		fa = new int[n];
		Arrays.fill(fa, GraphConstants.NULL_NODE);
	}
	
	protected FatherTreeTopo(){
	}
	
	public void setRoot(int r){
		fa[r] = r;
		root = r;
	}
	
	public void addEdge(int fa, int child){
		this.fa[child] = fa;
	}
	
}
